'''
Author: duliang thinktanker@163.com
Date: 2025-05-17 11:13:01
LastEditors: duliang thinktanker@163.com
LastEditTime: 2025-05-18 09:09:23
FilePath: 
Description: 
'''
import json
import time


def check_data(datatype, data):
    result = 0
    with open("./config/checkdata.json", "r", encoding="utf8") as f:
        j = json.load(f)
    if data > j["check"][datatype][1] or data < j["check"][datatype][0]:
        result = (int(time.time()), data)
    return result


if __name__ == "__main__":
    print(check_data("水位差", 1.01))
